import { createApp } from 'vue'
// import './style.css'
import store from './store/index'
import App from './App.vue'
import router from "./router/index"
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
console.log(
    import.meta.env);
const app = createApp(App)
    // vite中获取环境变量
    // 注册全局指令 api
import api from "./api"
app.config.globalProperties.$api = api
    // 在属性前+$代表属性是程序员自己添加的 非系统自带的
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(ElementPlus)
    .use(store)
    .use(router)
    .mount('#app')